<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0,maximum-scale=1">
    
    <title>gka-preview</title>
</head>
<body>

    <canvas id="gka" width="670" height="23"></canvas>
    <script src="https://unpkg.com/studiojs/dist/studiojs.min.js"></script>
    <script src="./gka-data.js"></script>
    <script>
    var Frame = studiojs.Frame;
    var canvas = document.getElementById('gka');
    var img = new Image();
    img.onload = () => {
        var frameData = {
            images: [img],
            frames: data.frames,
            animations: {
                default: ["0-2", "default"]
            }
        };
        var material = new Frame(canvas, frameData, "default", 3);
        setInterval(()=> {
            material.update();
        }, 16);
    };
    img.src = "img/" + data.file;
    </script>
</body>
</html>